load("@build_bazel_rules_android//android:rules.bzl", "android_library")

licenses(["notice"])

package(default_visibility = ["//visibility:public"])

java_library(
    name = "keys_downloader",
    srcs = ["KeysDownloader.java"],
    deps = [
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_http_client_google_http_client",
    ],
)

java_library(
    name = "secret_bytes",
    srcs = ["SecretBytes.java"],
    deps = [
        ":bytes",
        "//src/main/java/com/google/crypto/tink:secret_key_access",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

android_library(
    name = "secret_bytes-android",
    srcs = ["SecretBytes.java"],
    deps = [
        ":bytes-android",
        "//src/main/java/com/google/crypto/tink:secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/subtle:random-android",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "bytes",
    srcs = ["Bytes.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

android_library(
    name = "bytes-android",
    srcs = ["Bytes.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink/subtle:hex-android",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "secret_big_integer",
    srcs = ["SecretBigInteger.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:secret_key_access",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

android_library(
    name = "secret_big_integer-android",
    srcs = ["SecretBigInteger.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:secret_key_access-android",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)
